<style lang="less">
	@import "./v2Article.less";
	@import "../../styles/common.less";
	@import "../../sprcore/common.less";
</style>
<template>
	<div>
		<Row classs="spr_table">
			<Input v-model="list_searchKey" placeholder="" style="width: 400px" />
			<Button type="ghost" icon="ios-search" style="background-color: white;" @click="list_search">搜索</Button>
			<Button type="primary" @click="form_create" v-show="p_v2Article_create">新增文章管理-v2_article</Button>
		</Row>
		<Row class="spr_table">
			<Table border :columns="columns" :data="list_datas" :stripe="true"></Table>
		</Row>
		<Row class="spr_page">
			<Page :total="list_totalCount" :page-size="list_pageSize" @on-change="list_changePage" show-sizer @on-page-size-change="list_changePageSize"></Page>
		</Row>

		<Modal :title="form_createOrUpdateModalTitle" v-model="form_createOrUpdateModal" :closable='true' :mask-closable=false :loading="form_createOrUpdateModalLoading" @on-ok="form_handlecreateOrUpdateItemForm" :width="800">
			<Form :model="form_createOrUpdateItemForm" ref="form_createOrUpdateItemForm" :label-width="120" :rules="form_createOrUpdateItemFormRuleValidate">
				<input type="hidden"  v-model="form_createOrUpdateItemForm.id">
				
				<FormItem label="文章来源链接" prop="fromUrl">
					<Input type="text" v-model="form_createOrUpdateItemForm.fromUrl" placeholder="请输入文章来源链接"></Input>				
				</FormItem>	
				<FormItem label="文章标题" prop="title">
					<Input type="text" v-model="form_createOrUpdateItemForm.title" placeholder="请输入文章标题"></Input>				
				</FormItem>	
				<FormItem label="文章类型" prop="articleType">
					<RadioGroup v-model="form_createOrUpdateItemForm.articleType" type="button">
						<Radio v-for="item in dict_article_type" :label="item.itemValue">{{item.itemLabel}}</Radio>
					</RadioGroup>				
				</FormItem>	
				<FormItem label="解析页面" prop="parsefileId">
		            <Select
		                v-model="form_createOrUpdateItemForm.parsefileId"
		                prop="buildingregionId"
		                clearable
		                remote
		                :remote-method="form_getdata_parsefileId"
		                :loading="form_loading_parsefileId">
		                <Option v-for="(item, index) in formdata_parsefileId" :value="item.itemValue" :key="index">{{item.itemLabel}}</Option>
		            </Select>		
				</FormItem>	
				<FormItem label="专栏column_id" prop="columnId">
		            <Select
		                v-model="form_createOrUpdateItemForm.columnId"
		                prop="buildingregionId"
		                clearable
		                remote
		                :remote-method="form_getdata_columnId"
		                :loading="form_loading_columnId">
		                <Option v-for="(item, index) in formdata_columnId" :value="item.itemValue" :key="index">{{item.itemLabel}}</Option>
		            </Select>		
				</FormItem>	
				<FormItem label="来源from_id" prop="fromId">
		            <Select
		                v-model="form_createOrUpdateItemForm.fromId"
		                prop="buildingregionId"
		                clearable
		                remote
		                :remote-method="form_getdata_fromId"
		                :loading="form_loading_fromId">
		                <Option v-for="(item, index) in formdata_fromId" :value="item.itemValue" :key="index">{{item.itemLabel}}</Option>
		            </Select>		
				</FormItem>	
				<FormItem label="所属用户" prop="belongUserId">
		            <Select
		                v-model="form_createOrUpdateItemForm.belongUserId"
		                prop="buildingregionId"
		                clearable
		                remote
		                :remote-method="form_getdata_belongUserId"
		                :loading="form_loading_belongUserId">
		                <Option v-for="(item, index) in formdata_belongUserId" :value="item.itemValue" :key="index">{{item.itemLabel}}</Option>
		            </Select>		
				</FormItem>	
				<FormItem label="收藏数" prop="initFavorites">
					<Input type="text" v-model="form_createOrUpdateItemForm.initFavorites" placeholder="请输入收藏数"></Input>				
				</FormItem>	
				<FormItem label="封面图片" prop="fileCoverImage">
					<Input type="text" v-model="form_createOrUpdateItemForm.fileCoverImage" placeholder="请输入封面图片"></Input>				
				</FormItem>	
				<FormItem label="内容" prop="content">
					<Input v-model="form_createOrUpdateItemForm.content" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="Enter something..."></Input>				
				</FormItem>	
				<FormItem label="在column下的排序" prop="columnNo">
					<Input type="text" v-model="form_createOrUpdateItemForm.columnNo" placeholder="请输入在column下的排序"></Input>				
				</FormItem>	
			</Form> 
		</Modal>
	</div>
</template>
<script>
 	import v2Article from './v2Article.js';
 	export default v2Article;
</script>